-- GENERATED SPELL FOR [Mordenai] --


function spell0_22113(pUnit, Event) --@Aimed Shot,n/a--
pUnit:FullCastSpellOnTarget(38370,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22113', 3000, 1)
end

function spell1_22113(pUnit, Event) --@Arcane Shot,n/a--
pUnit:FullCastSpellOnTarget(36623,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22113', 0, 1)
end

function spell2_22113(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(38372,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22113', 594, 1)
end

function Sorts_22113(pUnit, Event)
local choix_sorts_22113 = math.random(0, 2)
if choix_sorts_22113 == 0 then
pUnit:RegisterEvent('spell0_22113', 1, 1)
end
if choix_sorts_22113 == 1 then
pUnit:RegisterEvent('spell1_22113', 1, 1)
end
if choix_sorts_22113 == 2 then
pUnit:RegisterEvent('spell2_22113', 1, 1)
end
end

function mob22113_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22113', math.random(1500, 3000), 1)
end

function mob22113_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22113_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22113_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22113, 1, 'mob22113_Action')
RegisterUnitEvent(22113, 2, 'mob22113_Leave')
RegisterUnitEvent(22113, 3, 'mob22113_Kill')
RegisterUnitEvent(22113, 4, 'mob22113_Die')
